
import 'package:flutter/material.dart';
class HomePage extends StatelessWidget {
  @override

  Widget w_banner(){
    return new Image.asset('assets/images/banner.png', fit: BoxFit.cover);
  }

  Widget w_ttile(){
    return new Container(
      padding: const EdgeInsets.all(10.0),
      child:new Row(
        children:<Widget>[
          new Expanded(
            child: new Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: <Widget>[
                    new Container(
                      padding: const EdgeInsets.only(bottom: 8.0),
                      child: new Text(
                        'Oeschinen Lake Campground',
                        style: new TextStyle(
                          fontSize: 18.0,
                          fontWeight: FontWeight.bold,
                        ),
                      ),
                    ),
                    new Text(
                      'Kandersteg, Switzerland',
                      style: new TextStyle(
                        color: Colors.yellow[500],
                      ),
                    ),
                  ],
                ),
          ),
          new Icon(
            Icons.star,
            color: Colors.red[500],
          ),
          new Text('41'),
        ],
      ),
    );
  }

  Column buildButtonColumn(BuildContext context,IconData icon,String label){
    Color color = Theme.of(context).primaryColor;
    return new Column(
      mainAxisSize: MainAxisSize.min,
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        new Icon(icon, color: color),
        new Container(
          margin: const EdgeInsets.only(top: 8.0),
          child: new Text(
            label,
            style: new TextStyle(
              fontSize: 12.0,
              fontWeight: FontWeight.w400,
              color: color,
            ),
          ),
        ),
      ],
    );
  }

  Widget w_opt(BuildContext context){
    return  new Container(
      margin: const EdgeInsets.only(top: 8.0),
      decoration: new BoxDecoration(color: Colors.white10),
      child: new Row(
        mainAxisAlignment: MainAxisAlignment.spaceEvenly,
        children: <Widget>[
          buildButtonColumn(context,Icons.call,'Call'),
          buildButtonColumn(context,Icons.near_me,'ROUTE'),
          buildButtonColumn(context,Icons.share,'SHARE')
        ],
      ),
    );
  }

  Widget w_txt=new Container(
    padding: const EdgeInsets.all(32.0),
    child: new Text(
      '''
Lake Oeschinen lies at the foot of the Blüemlisalp in the Bernese Alps. Situated 1,578 meters above sea level, it is one of the larger Alpine Lakes. A gondola ride from Kandersteg, followed by a half-hour walk through pastures and pine forest, leads you to the lake, which warms to 20 degrees Celsius in the summer. Activities enjoyed here include rowing, and riding the summer toboggan run.
        ''',
      softWrap: true,
    ),
  );


  Widget build(BuildContext context) {
    return new Container(
      decoration: new BoxDecoration(color: Colors.grey),
      child: new Container(
        child: new Column(
          children: <Widget>[
            w_banner(),
            w_ttile(),
            w_opt(context),
            w_txt
          ],
        ),
      ),
    );
  }
}

